<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="">需求投诉管理</a></li>
		</ul>

		<form class="well form-search" method="post" id="cid-form">
			分类：
			<select id="type_id" name="type_id" style="width: 150px;">
				<option value=''>全部</option>
				<foreach name="types" item="vo">
					<option value='{$vo.id}'>{$vo.name}</option>
				</foreach>
			</select> &nbsp;&nbsp;

			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="">清空</a>
		</form>

		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="50">用户ID</th>
						<th>用户名</th>
						<th>用户电话</th>
						<th>需求ID</th>
						<th>需求标题</th>
						<th>帖子链接</th>
						<th>是否解决</th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<php>$status=array("1"=>'未处理',"2"=>'已处理',"3"=>'不处理');</php>
				<tbody>
					<foreach name="data" item="vo">
					<tr>
						<td>{$vo.user_id}</td>
						<td>{$vo.username}</td>
						<td>{$vo.phone}</td>
						<td>{$vo.id}</td>
						<td>{$vo.title}</td>
						<td><a href="{:U('pageShow',array('id'=>$vo['id']))}" target="_blank">需求内容</a></td>
						<td><php>echo $status[$vo['is_resolve']]</php></td>
						<td>
                            <a href="{:U('complainDetail',array('id'=>$vo['id']))}">查看详情</a> 
                            <if condition="$vo['is_resolve'] eq 1">
                            	|<a href="{:U('complainStatus',array('ids'=>$vo['ans_id'],'status'=>2))}" class="js-ajax-dialog-btn" data-msg="确定解决了该投诉么？">确认解决</a>
                            </if>
                        </td>
					</tr>
					</foreach>
				</tbody>
			</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
        (function(){
            $("#type_id").val("<?=$formget['type_id']?>");
        })();
	</script>
</body>
</html>